package com.ycw.service.xiaocai.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ycw.bean.Comments;
import com.ycw.bean.Projects;
import com.ycw.dao.CommentsMapper;
import com.ycw.dao.ProjectsMapper;
import com.ycw.service.xiaocai.XiaoCaiService;

@Service
public class XiaoCaiServiceImpl implements XiaoCaiService {

	@Autowired
	CommentsMapper commentsMapper;

	@Override
	public List<Comments> getALLComments() {
		return commentsMapper.getALLComments();

	}

	//删除评论通过id 
	@Override
	public void deleteComments(Comments comments) {
		
		commentsMapper.deleteByPrimaryKey(comments);
		
	}

	@Autowired
	ProjectsMapper projectsMapper;
	//项目名称、项目发起人、项目状态（ID）、项目分类（ID）
	@Override
	public List<Projects> getAllProjectAndType(String psName, String usName, Integer psType, Integer pstId) {
		
		return projectsMapper.getAllProjectAndType(psName,usName,psType,pstId);
	}

}
